package com.njbdqn.ALi.zjg.services;

import java.util.List;

import com.njbdqn.ALi.zjg.dao.CommentDAO;
import com.njbdqn.ALi.zjg.entity.Comment;
import com.njbdqn.ALi.zjg.vo.CommentVO;

public class CommentService {
private CommentDAO cdao;
	
	public CommentService(){
		cdao = new CommentDAO();
	}
	public int save(Comment comment){
		return cdao.save(comment);
	}
	public List<CommentVO> findAll(int book_id){
		return cdao.findAll(book_id);
	}
	
	public List<CommentVO> findAllSelect(int cp,int pageSize,int book_id){
		return cdao.findAllSelect(cp, pageSize, book_id);
	}
	
	public int findNumber(int commentid){
		return cdao.findNumber(commentid);
	}
	public int findCommentNumber(int book_id){
		return cdao.findCommentNumber(book_id);
	}
}
